/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package amount;

import java.util.HashSet;
import score.Score;

/**
 *
 * @author Daniel Gribel
 */

public class SpecialCharAmount extends Amount {
    
    public SpecialCharAmount(Score score, String name) {
        super(score, name);
    }
    
    @Override
    public void checkClauses(char character) {
        if(getSpecialChars().contains(character))
            setCounter(getCounter() + 1);
    }
    
    private static HashSet<Character> getSpecialChars() {
        HashSet<Character> symbols = new HashSet<Character>();
        symbols.add('!');
        symbols.add('@');
        symbols.add('#');
        symbols.add('$');
        symbols.add('%');
        symbols.add('^');
        symbols.add('&');
        symbols.add('*');
        symbols.add('?');
        symbols.add('_');
        symbols.add('~');
        return symbols;
    }

}
